/**
 * Copyright (c) 2014- 2015 YCY Group Holding Ltd.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package com.jkwzms.system.auth.repository;

import java.util.Set;

import com.jkwzms.common.repository.BaseRepository;
import com.jkwzms.system.auth.entity.Auth;

/**
 * <p>
 * User: Jack Liang
 * <p>
 * Date: 13-2-4 下午3:00
 * <p>
 * Version:1.0.0
 */
public interface AuthRepository extends BaseRepository<Auth, Long> {

    Auth findByUserId(Long userId);

    Auth findByGroupId(Long groupId);

    Auth findByOrganizationIdAndJobId(Long organizationId, Long jobId);

    // /////////委托给AuthRepositoryImpl实现
    public Set<Long> findRoleIds(Long userId, Set<Long> groupIds, Set<Long> organizationIds, Set<Long> jobIds,
                                 Set<Long[]> organizationJobIds);

}
